<?php
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'partnerkin',
    'defaultController' => 'site', 
    'language'=>'ru',
    
    'modules' => array(
        'admin' => array(
            'defaultController' => 'default',
            'layout' => 'main',
        ),
        'user' => array(
            'defaultController' => 'default',
            'layout' => '//layouts/main',
        ),
        'partner' => array(
            'defaultController' => 'default',
            'layout' => '//layouts/main',
        ),
        'blog' => array(
            'defaultController' => 'default',
            'layout' => '//layouts/main',
        ),
        'gii'=>array(
            'generatorPaths'=>array(
                'bootstrap.gii',
            ),
        ),
    ),
    
    'aliases' => array(
        'bootstrap' => dirname(__FILE__).'/../extensions/bootstrap',
        'xupload' => 'ext.xupload'
    ),
    
    'import' => array(
        'application.models.ar.*',
        'application.models.forms.*',
        'application.models.models.*',
        'application.components.*',
	'application.components.ImageHandler.CImageHandler',
        'application.components.cache.*',
        'application.actions.*',
        'xupload.models.XUploadForm',
        'xupload.actions.XUploadAction',
        'application.helpers.*',
        'ext.ulogin.controllers.UloginController'
    ),
        
    'components' => array(
        'db' => array(
            'connectionString' => 'mysql:host=localhost;dbname=partnerkin',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
        ),
		
        'ih'=>array(
            'class'=>'CImageHandler',
        ),
        
        'bootstrap'=>array(
            'class'=>'bootstrap.components.Bootstrap',
        ),
        
        'session' => array (
            'timeout' => 3600 * 24,
        ),
        
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive' => false,
            
            'rules' => require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'urlRules.php',
        ),
        
        'request' => array(
            'enableCookieValidation' => true,
        ),
        
        'user' => array(
            'allowAutoLogin' => true,
            'loginUrl' => array('user/default/login'),
            'class' => 'WebUser',
        ),
        
        'authManager' => array(
            'defaultRoles' => array('guest'),
            'class' => 'AuthManager',
        ),
        
        'widgetFactory' => array(
            'enableSkin' => true,
        ),
        
        'cache'=>array(
           'class'=>'system.caching.CDummyCache',
//            'class'=>'system.caching.CFileCache',
        ), 
    ),
    
    'params' => require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'params.php',
);